def correct(s: str) -> str:
    stack = []
    opening = {'(', '[', '{', '<'}
    closing = {')', ']', '}', '>'}
    matching = {')': '(', ']': '[', '}': '{', '>': '<'}

    for chr in s:
        if chr in opening:
            stack.append(chr)
        elif chr in closing:
            if not stack:
                return "Incorrect"
            top = stack.pop()
            if top != matching[chr]:
                return "Incorrect"

    return "Correct" if not stack else "Incorrect"

print("Input parenthesis sequence: ")
s = input()
s = [s]
print(correct(s))
